package com.oak.broke.model.vip.v1;

import com.oak.broke.model.vip.service.IVipLevelService;
import com.oak.broke.model.vip.vo.api.VipLevelVO;
import com.oak.broke.model.vip.base.ResponseMessage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author tanghan
 * @Description 会员等级api
 * @date 2023/04/14/ 16:32:00
 */
@Api(tags = "会员等级")
@RestController
@RequestMapping("/api/v1/vip/level")
public class VipLevelV1Api {

    @Autowired
    private IVipLevelService vipLevelService;

    @ApiOperation("查询所有会员等级")
    @GetMapping("/list")
    public ResponseMessage<List<VipLevelVO>> listVipLevel(@RequestParam("vipLevelType") String vipLevelType) {
        return ResponseMessage.success(vipLevelService.listVipLevel(vipLevelType));
    }
}
